import api from '../../index'

export default {
  // 查看用户列表
  index: (data: {
    name: string
    page: number
    size: number
  }) => api.post('member/index', data),

  // 新增用户
  add: (data: {
    username: string
    password: string
    is_check: number
  }) => api.post('member/add', data),

  // 修改用户登录
  changeState: (data: {
    id: number
    is_check: number
  }) => api.post('member/change', data),

  // 编辑用户
  edit: (data: {
    id: number
    is_check: number
    gender: number | undefined
    username: string
    password: string
    nickname: string
    mobile: string
    group_id: number
  }) => api.post('member/edit', data),

  // 删除用户
  delete: (data: {
    id: number
  }) => api.post('member/delete', data),
}
